#include<iostream>
using namespace std;

int main()
{
    float input;
	int i=2;
	float sum=0;
	cin>>input;
	while(input!=0)
	{
		sum+=1.0/i;
		if(sum>=input) 
		{
			cout<<i-1<<" card(s)"<<endl;
			i=2;sum=0;
			cin>>input;
			continue;
		}
		i++;
	}
	return 0;
}